package com.test.mooan.labama.utils_boom.helper_boom;

import android.provider.Settings;
import android.text.TextUtils;

import com.test.mooan.labama.activity_fragment_boom.base_boom.BaseApplication_boom;
import com.test.mooan.labama.constants_boom.Constant_boom;

import org.jetbrains.annotations.NotNull;


public class DecHelper_boom {

    private static class InnerDeviceHelper {
        private static final DecHelper_boom instance = new DecHelper_boom();
    }

    public static DecHelper_boom gInstance() {
        return InnerDeviceHelper.instance;
    }

    @NotNull
    public static String gPackageName() {
        String pckName = BaseApplication_boom.getInstant_boom().getPackageName();
        if (TextUtils.isEmpty(pckName)) {
            pckName = Constant_boom.PACKAGE_NAME;
        }
        return pckName;
    }

    @NotNull
    public String gAndroidID() {
        String androidID = Settings.System.getString(BaseApplication_boom.getInstant_boom().getContentResolver(), Settings.Secure.ANDROID_ID);
        if (TextUtils.isEmpty(androidID)) {
            return System.currentTimeMillis() + "";
        }
        if (androidID.contains("00000000")) {
            return System.currentTimeMillis() + "";
        }
        return androidID;
    }

}
